﻿using OA.Core.Other;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace OA.Model.Api
{
    public class VoucherInfo : BaseResult
    {
         

        public int CustomID { get; set; }

        public int FormID { get; set; }

        public string CustomFormName { get; set; }

        public string Title { get; set; }
        /// <summary>
        ///  是否会签
        /// </summary>
        public bool HasCountersign { get; set; } = false;

        /// <summary>
        /// 用户自定义流程
        /// </summary>
        public bool IsCustomProcess { get; set; }

        public List<MyTabInfo> Tabs { get; set; }

        public Dictionary<string, List<ExtendField>> NewLineInfos { get; set; }

        public List<DepartmentInfoResult> Departments { get; set; }

        public Dictionary<int, List<PositionInfo>> Positions { get; set; }

        public Dictionary<int, List<EmployeeInfo>> EmployeeInfo { get; set; }

        /// <summary>
        /// 下拉选择数据源
        /// </summary>
        public Dictionary<string, List<MySelectItem>> DicDataScore { get; set; }

        /// <summary>
        /// 最大深度
        /// </summary>
        public int MaxDepth { get; set; }

    }

    public class MyTabInfo
    {
        public int TableID { get; set; }

        public string Key { get; set; }

        public string Name { get; set; }

        public List<TrInfo> TrInfos { get; set; }

        public string AddBottomTop { get; set; } = "38.2%";

        public bool IsMove { get; set; } = false;
    }

    public class TrInfo
    {
        public List<ExtendField> ExtendFields { get; set; }
    }

    public class MySelectItem
    {
        public string id { get; set; }

        public string name { get; set; }

        public bool Checked { get; set; } = false;
    }

    public class DepartmentInfoResult
    {
        public int id { get; set; }

        public string name { get; set; }

        public List<DepartmentInfoResult> child { get; set; }

        public List<int> Path { get; set; }

    }

    public class DepartmentInfo
    {
        public int ID { get; set; }

        public string Name { get; set; }

        public List<int> Path { get; set; }

        public int Depth { get; set; }

    }

    public class DepartmentsResult
    {
        public DepartmentInfoResult Result { get; set; }
    }

    public class PositionInfo
    {
        public string id { get; set; }

        public string name { get; set; }
    }

    public class EmployeeInfo
    {
        public string id { get; set; }

        public string name { get; set; }
    }
}
